<?
	Class Lang {
		static public function Translate(&$input,$lang='english') {
			$ldir = __APP_PATH. '/lang/' . $lang.'/';
			$ldirH = opendir($ldir);
			$params = array();
			while ($lfile = readdir($ldirH)) {
				if(strpos($ldir.$lfile,'.ini')) $params = array_merge($params,parse_ini_file($ldir.$lfile));
			}
			foreach($params as $k=>$p) $__params["__".$k] = $p;
			unset($params);
			$input = str_replace(array_keys($__params),$__params,$input);
		}
	}
?>
